<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
    <link rel="stylesheet" href="/static/css/style.css">
    <title>News - ${site[0].name!''}</title>
    <meta name="description" content="Latest news and updates from ${site[0].name!''}">
    <meta name="keywords" content="news, updates, industry news">
    <script async src="/static/js/v0.js"></script>
</head>
<body>
<#include "/base/header.html">
<div class="bread-bg">
    <div class="bread-crumb">
        <ul>
            <li><a href="/">Home</a></li>
            <li> &gt;</li>
            <li><span>News</span></li>
            <#if currentCategory?? && currentCategory != ''>
                <li> &gt;</li>
                <#list news_categories as categoryData>
                    <#if categoryData.category.path == currentCategory>
                        <li><span>${categoryData.category.title!''}</span></li>
                    </#if>
                </#list>
            </#if>
        </ul>
    </div>
</div>

<div class="inner-page-middle">
    <div class="inner-page-content">
        <div class="inner-page-r">
            <#if news_categories??>
                <#assign fullUrl = currentPath!''>
                <#assign pathArray = fullUrl?split('/')>
                <#assign currentCategory = ''>
                
                <#if pathArray?size gt 2>
                    <#assign currentCategory = pathArray[2]>
                </#if>
                
                <#list news_categories as categoryData>
                    <#assign category = categoryData.category>
                    <#assign articles = categoryData.articles>
                    
                    <#if pathArray?size <= 2 || currentCategory == category.path>
                        <section class="news-listing">
                            <div class="news-listing-t">
                                <h5><a href="/news/${category.path!''}">${category.title!''}</a></h5>
                                <#if articles?? && articles?size gt 5>
                                    <span><a href="/news/${category.path!''}">View All</a></span>
                                </#if>
                            </div>
                            <ul>
                                <#if articles?? && articles?size gt 0>
                                    <#list articles as article>
                                        <li>
                                            <a href="/news/${category.path!''}/${article.slug!''}">
                                                <div class="news-listing-box">
                                                    <div class="news-listing-time">
                                                       
                                                        <#if article.customFields?? && article.customFields?has_content>
                                                            <#assign fields = article.customFields?eval>
                                                            <h3>${(fields.title)!''}</h3>
                                                            <p>${(fields.news_desc)!''}</p>
                                                        </#if>
                                                        <p class="time">${article.createTime?string('yyyy-MM-dd')}</p>
                                                    </div>
                                                </div>
                                            </a>
                                        </li>
                                    </#list>
                                <#else>
                                    <li class="no-articles">No articles found in this category.</li>
                                </#if>
                            </ul>
                        </section>
                    </#if>
                </#list>
            </#if>
        </div>
        
        <!-- 左侧导航 -->
        <div class="inner-page-l">
            <div class="sidebar-block">
                <div class="sidebar-box sidebar-news">
                    <div class="sidebar-title">
                        <span>News Categories</span>
                    </div>
                    <div class="sidebar-contant">
                        <ul>
                            <#if news_categories??>
                                <#list news_categories as categoryData>
                                    <#assign category = categoryData.category>
                                    <li class="${(currentCategory == category.path)?string('active', '')}">
                                        <img src="/static/images/icons/right.svg" width="12" height="12">
                                        <a href="/news/${category.path!''}">${category.title!''}</a>
                                    </li>
                                </#list>
                            </#if>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<#include "/base/footer.html">
</body>
</html>
